import React, { useEffect, useRef } from 'react'

export default function useDidUpdateEffect(fn: () => unknown) {
  const flag = useRef(false)
  useEffect(() => {
    console.log('111111')

    if (flag.current) fn()
    else flag.current = true
  })
}
